#include "pthreadpool.hpp"
#include "Task.hpp"

int main()
{
    cout << get_time() << endl;

    pthreadpool<Task>* pool = pthreadpool<Task>::getpoool();
    cout << pool << endl;
    pthreadpool<Task>* _pool = pthreadpool<Task>::getpoool();
    cout << _pool << endl;
    
    while (1)
    {
        srand((unsigned int)time(nullptr));
        int a = rand() % 100;
        if(a < 0)
        {
            a = -a;
        }
        int b = rand() % 100;
        if(b < 0)
        {
            b = -b;
        }
        sleep(1);

        pool->push_task(Task(a, b));
    }
    return 0;
}